
export default class PopUpInfo extends HTMLElement {
    constructor() {
        super();
        console.log('元素的功能代码写在这里么？')
        // 创建一个 shadow root
        const shadow1 = this.attachShadow({mode: 'open'});


        const title = document.createElement('h2');
        title.textContent = 'title';

        const body = document.createElement('div');
        body.textContent = 'body';

        shadow1.appendChild(title)
        shadow1.appendChild(body);
    
    }
    connectedCallback() {
        console.log('元素首次被插入 document 么？')

    }
}
